package com.zjj.learn.designmodel.principles.demo2.after;

/** 定义一个长方形，实现四边形接口
 * *** @author zjj_admin
 * *** 2022/4/4 23:29
 */
public class Square implements Quadrilateral{

    private double size;

    public void setSize(double size) {
        this.size = size;
    }

    public double getSize() {
        return size;
    }

    @Override
    public double getLength() {
        return this.size;
    }

    @Override
    public double getWidth() {
        return this.size;
    }
}
